package com.yan.design.two.establish.s2.f2.i;

import com.yan.design.two.establish.s2.f2.Apple;
import com.yan.design.two.establish.s2.f2.Orange;


/**
 * 2. 工厂方法
 *      运行
 * @author shengren.yan
 * @create 2022-07-17
 */
public class runMain {

    public static void main(String[] args) {
        // 通过苹果工厂创建苹果对象
        Apple a1 = new AppleFactory().getFruit();
        a1.getPut();
        Orange a2 = new OrangeFactory().getFruit();
        a2.getPut();
    }


}
